<template>
  <a-drawer
    width="50%"
    title="财务费用确认"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rulesCaiwu"
      layout="vertical"
    >
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row
          :gutter="32"
          style="width: 85%; margin-left: 15%; margin-top: -10px"
        >
          <a-col :span="24" style="margin-left: -120px; margin-bottom: 15px">
            <div style="display: flex; flex-direction: row">
              <span
                style="
                  width: 5px;
                  height: 22px;
                  background-color: coral;
                  display: block;
                "
              ></span>
              <span
                style="
                  margin-left: 5px;
                  height: 22px;
                  line-height: 22px;
                  font-size: 16px;
                  font-weight: 600;
                "
                >进件信息</span
              >
            </div>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="进件编号" prop="jinjianId">
              <a-input v-model="form.jinjianId" disabled />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="客户姓名" prop="cusName">
              <a-input v-model="form.cusName" disabled />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="申请时间" prop="createTime">
              <a-input v-model="form.createTime" disabled />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="放款金额（元）" prop="fkAmount">
              <a-input-number
                v-model="form.fkAmount"
                :min="0"
                style="width: 100%"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="客服" prop="serviceName">
              <a-input v-model="form.serviceName" disabled />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="客户经理" prop="userName">
              <a-input v-model="form.userName" disabled />
            </a-form-model-item>
          </a-col>

          <a-col :span="24" style="margin-left: -120px; margin-bottom: 15px">
            <div style="display: flex; flex-direction: row">
              <span
                style="
                  width: 5px;
                  height: 22px;
                  background-color: coral;
                  display: block;
                "
              ></span>
              <span
                style="
                  margin-left: 5px;
                  height: 22px;
                  line-height: 22px;
                  font-size: 16px;
                  font-weight: 600;
                "
                >服务费用</span
              >
            </div>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="服务费（元）" prop="serviceAmount">
              <a-input-number
                v-model="form.serviceAmount"
                :min="0"
                style="width: 100%"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item
              label="客服确认回款（元）"
              prop="serviceConfirmAmount"
            >
              <a-input-number
                v-model="form.serviceConfirmAmount"
                style="width: 100%"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item
              label="财务确认金额（元）"
              prop="serviceAmountCheck"
            >
              <a-input-number
                v-model="form.serviceAmountCheck"
                style="width: 100%"
                :disabled="form.caiwuCheck == 1"
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="24" style="margin-left: -120px; margin-bottom: 15px">
            <div style="display: flex; flex-direction: row">
              <span
                style="
                  width: 5px;
                  height: 22px;
                  background-color: coral;
                  display: block;
                "
              ></span>
              <span
                style="
                  margin-left: 5px;
                  height: 22px;
                  line-height: 22px;
                  font-size: 16px;
                  font-weight: 600;
                "
                >回款成本</span
              >
            </div>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="钥匙费" prop="serviceKeyAmount">
              <a-input-number
                v-model="form.serviceKeyAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入钥匙费"
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="退保费" prop="serviceInsuranceAmount">
              <a-input-number
                v-model="form.serviceInsuranceAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入退保费"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="谈单费" prop="serviceDealAmount">
              <a-input-number
                v-model="form.serviceDealAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入谈单费"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="客服签单费" prop="serviceSignAmount">
              <a-input-number
                v-model="form.serviceSignAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入客服签单费"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="安装GPS费" prop="serviceGpsAmount">
              <a-input-number
                v-model="form.serviceGpsAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入安装GPS费"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="抵押费" prop="serviceDiyaAmount">
              <a-input-number
                v-model="form.serviceDiyaAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入抵押费"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="解压费" prop="serviceJieyaAmount">
              <a-input-number
                v-model="form.serviceJieyaAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入解压费"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="垫资成本" prop="servicePayAmount">
              <a-input-number
                v-model="form.servicePayAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入垫资成本"
                disabled
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="其他成本" prop="serviceOtherAmount">
              <a-input-number
                v-model="form.serviceOtherAmount"
                :min="0"
                style="width: 100%"
                placeholder="请输入其他成本"
                disabled
              />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button
            type="primary"
            @click="handleCaiWuConfirm()"
            v-if="form.caiwuCheck == 0"
            style="background-color: orange; border-color: orange"
          >
            确认
          </a-button>
          <a-button
            @click="handleCaiWuConfirmRefuse()"
            type="danger"
            :loading="refuseLoading"
          >
            退回
          </a-button>
          <a-button @click="cancel"> 取消 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>

<script>
import BizJinjianBillEditForm from "./BizJinjianBillForm";
export default {
  ...BizJinjianBillEditForm,
};
</script>
